Smoother HiQ for AviSynth
v1.01
Plugin for AviSynth by Klaus
Post.
Introduction:
This filter performs smoothing on video material to eliminate noise
and MPEG artifacts. The filter has many different settings, so it can do
smoothing without destroying too many details. This filter makes it possible
to blur out noise and still retain a fair amount of detail. Rewritten on
basis of Smart Smoother HiQ for Virtual Sub. This is an YUV-version of
the filter, that will only work with AviSynth.
Download:
[Download binaries] Smoother HiQ v1.01
[Download source code] Smoother
HiQ v1.0 (MSVC 6 + preprocessor pack 5).
Installation:
Unzip (Using WinZip, WinRar or Windows Commander) into the AviSynth
installation directory, or anywhere else you'd like.
Usage:
The filter works by blurring areas that seems to be connected. That means
that the images will still maintain the overall structure, but loose small
details, such as noise and MPEG-artifacts. The filter operates in a frame
around each pixel. Each of the pixels are tested against the current pixel.
If the difference between the current pixel and the tested pixel
is below a given threshold these two pixels are blurred.
Remember to import the filter before using it. Add the following line
to your .AVS script:
LoadPlugin("c:\AviSynth\smoothhiq.dll")
With the correct path to where you unzippped the DLL.
Use the following syntax to activate the filter:
SmoothHiQ(Diameter, Luma Threshold, Chroma threshold, Amount, Maintain Difference)
Diameter
Defines on how big a diameter the filter works. Diameter can be 3,5,7,9,11
or 13. The greater the diameter, the more smooth will the video appear. Has
especially influence on big evenly colored surfaces. The greater the diameter,
the slower will the filter operate. Recommended settings are 5 or 7.
Thresholds
The threshold defines how different the light value (luma) or the
color (chroma) may be, to influence the current pixel. The value can be
from 1 to 255. Small thresholds give little blurring and larger will give
a more blurred image. In general it is recommended to set the Chroma threshold
higher than Luma threshold, since there often is more color noise. Recommended
settings are Luma threshold: 15-25 and Chroma threshold: 15-35.
Amount
Amount specifies how much influence the blur at maximum can have on the
result. The value can be 1 to 256. It can be seen as a blend factor between
the blurred image and the original image. When amount is set to 256,
the blurred image is returned as output. Setting a smaller value will retain
more details (and noise) from the original image. Experiment with ‘amount’
– much material can bear quite high amount – and other material get very
washed out. Experiment by setting thresholds first, and adjust amount after
that. In general a high (more than 200) amount is recommended on noisy material.
Maintain Difference
Maintain difference will makes the filter use maximum blur on all pixels
that has differences below this threshold. The is ideal for removing small
differences in evenly colored areas.
Maintain difference should be small (0 to 10), since larger values will
produce ‘exaggerated’ blurring. Using a value equal to or greater than
luma threshold will disable the difference weighing, and will remove much
detail.
Notes:
- Find more info on the settings on the Smart Smoother HiQ for Virtual Dub
pages (in the Hosted section). It is also easier to experiment with
the Virtual Dub filter, since it provides a GUI and live updating and blur
visualization.
- The Avisynth and the Virtual Dub version will produce different results.
That's because they operate in different colorspaces. The Avisynth version
will most often produce the most compressible result, because it operates
in the same color-space as the codec's.
Todo:
- MMX-optimize all algorithms.
- Implement variable threshold based on luma.
- Implement temporal tests.
- Implement Average mode.
Other
Special thanks to Thomas Daniel for excellent feedback and help!
- Donald Graft for hosting my filters.
And also a special thanks to dividee for giving me an AviSynth 101.
Also thanks to: Leuf, Acaila, TT, _Outpinged, -h, poopety poop, Rudolf
Groß, Tøsen, VIC, Christian Senft & Avery Lee for help,
support, suggestions and other stuff this couldn't have been done without.
Contact
Contact Klaus Post at kp@interact.dk
for bugs, suggestions, comments, etc...
New versions of the filter should be downloadable from Donald Graft's filter page.